package per.ethan.javase.thread;

/**
 * @author Ethan
 * @date 2020/04/27 10:38
 */
public class Demo3 implements Runnable {

    public static void main(String[] args) {
        Demo3 demo3 = new Demo3();
        Thread thread = new Thread(demo3);
        thread.start();

        for (int i = 0; i < 20; i++) {
            System.out.println("main: " + i);
        }
    }

    @Override
    public void run() {
        for (int i = 0; i < 20; i++) {
            System.out.println("runnable: " + i);
        }
    }

}
